package com.yunshangwoniu.core.page;


import com.sun.xml.txw2.annotation.XmlElement;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;


/**
 *
 * @author 云上蜗牛
 *
 */
@XmlRootElement
public class PageTemplate implements Serializable
{
	private static final long serialVersionUID = 1L;
	private String id; 								// 模板ID
	private int pageContentSize; 					// 分页类型的尺寸比如1-10
	private String pageHeader; 						// 分页的头部一版显示每页多少条记录总共有多少条记录
	private PageNoContent previousPage; 			// 上一页
	private PageNoContent contentPage; 				// 非当前页
	private PageNoContent currentPage; 				// 当前页
	private PageNoContent nextPage; 				// 下一页

	public PageTemplate(String id, int pageContentSize, String pageHeader, PageNoContent previousPage,PageNoContent contentPage, PageNoContent currentPage, PageNoContent nextPage)
	{
		super();
		this.id = id;
		this.pageContentSize = pageContentSize;
		this.pageHeader = pageHeader;
		this.previousPage = previousPage;
		this.contentPage = contentPage;
		this.currentPage = currentPage;
		this.nextPage = nextPage;
	}

	public PageTemplate()
	{
		super();
	}

	public String getId()
	{
		return id;
	}

	@XmlAttribute
	public void setId(String id)
	{
		this.id = id;
	}

	public int getPageContentSize()
	{
		return pageContentSize;
	}
	@XmlElement
    public void setPageContentSize(int pageContentSize)
	{
		this.pageContentSize = pageContentSize;
	}

	public String getPageHeader()
	{
		return pageHeader;
	}
	@XmlElement
	public void setPageHeader(String pageHeader)
	{
		this.pageHeader = pageHeader;
	}

	public PageNoContent getPreviousPage()
	{
		return previousPage;
	}
	@XmlElement
	public void setPreviousPage(PageNoContent previousPage)
	{
		this.previousPage = previousPage;
	}

	public PageNoContent getContentPage()
	{
		return contentPage;
	}
	@XmlElement
	public void setContentPage(PageNoContent contentPage)
	{
		this.contentPage = contentPage;
	}

	public PageNoContent getCurrentPage()
	{
		return currentPage;
	}
	@XmlElement
	public void setCurrentPage(PageNoContent currentPage)
	{
		this.currentPage = currentPage;
	}

	public PageNoContent getNextPage()
	{
		return nextPage;
	}
	@XmlElement
	public void setNextPage(PageNoContent nextPage)
	{
		this.nextPage = nextPage;
	}
	@XmlElement
	public static class PageNoContent
	{
		private String urlOn; 			// url 开始
		private String urlOff; 			// url 结束

		public String getUrlOn()
		{
			return urlOn;
		}
		@XmlElement
		public void setUrlOn(String urlOn)
		{
			this.urlOn = urlOn;
		}

		public String getUrlOff()
		{
			return urlOff;
		}
		@XmlElement
		public void setUrlOff(String urlOff)
		{
			this.urlOff = urlOff;
		}

		public PageNoContent(String urlOn, String urlOff)
		{
			super();
			this.urlOn = urlOn;
			this.urlOff = urlOff;
		}

		public PageNoContent()
		{
			super();
		}
	}
}
